using System;
using System.Web.Security;
using System.Web.UI;

namespace SouthernLand.WebMaster.Membership
{
    public partial class CreateRole : Page
    {
        protected void CreateButton_Click(object sender, EventArgs e)
        {
            try
            {
                Roles.CreateRole(RoleTextbox.Text);
                MessageLabel.Text = "Role successfully created.";
                RoleTextbox.Text = "";
            }
            catch (System.Configuration.Provider.ProviderException exc)
            {
                MessageLabel.Text = "This Role already exists in the database.";
            }
        }
    }
}
